Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PM-12967] Create bitwarden-wasm-internal #1089

Merged
merged 9 commits into from
Oct 4, 2024
Merged

Conversation

Hinton
Copy link
Member

@Hinton Hinton commented Sep 27, 2024

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-12967

📔 Objective

PM SDK. Based on the research spike in #1077

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation
    team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed
    issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

Copy link
Contributor

github-actions bot commented Sep 27, 2024

Logo
Checkmarx One – Scan Summary & Details7af427ea-4a11-4acf-aa83-2a68de9706b4

New Issues

Severity Issue Source File / Package Checkmarx Insight
MEDIUM Unpinned Actions Full Length Commit SHA /publish-internal.yml: 86 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...

Copy link

codecov bot commented Sep 27, 2024

Codecov Report

Attention: Patch coverage is 0% with 29 lines in your changes missing coverage. Please review.

Project coverage is 58.32%. Comparing base (66949af) to head (2e9a13b).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
crates/bitwarden-wasm-internal/src/client.rs 0.00% 27 Missing ⚠️
...rates/bitwarden-core/src/client/client_settings.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1089      +/-   ##
==========================================
- Coverage   58.44%   58.32%   -0.13%     
==========================================
  Files         192      193       +1     
  Lines       13528    13557      +29     
==========================================
  Hits         7907     7907              
- Misses       5621     5650      +29     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Hinton Hinton changed the title Create bitwarden-wasm-internal [PM-12967] Create bitwarden-wasm-internal Sep 30, 2024
@Hinton Hinton marked this pull request as ready for review September 30, 2024 08:58
@Hinton Hinton requested a review from a team as a code owner September 30, 2024 08:58
Comment on lines 71 to 76
- name: Publish NPM
if: ${{ github.ref == 'refs/heads/main' }}
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: languages/js/sdk-internal
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should split the build and publish workflows. If it's needed to publish it on every push to main, I suggest triggering the publishing workflow here. An example of that can be found in the build-swift.yml workflow: https://github.com/bitwarden/sdk/blob/90f8a5461e5e7ed07b1f5a13fc2fb793994a6fb5/.github/workflows/build-swift.yml#L101-L115

BTW is it released to npmjs.com or to github packages?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently gh packages, but we will probably change it to npmjs.

…m-internal

# Conflicts:
#	Cargo.toml
#	crates/bitwarden-core/Cargo.toml
#	crates/bitwarden/Cargo.toml
js-sys = "0.3.68"
log = "0.4.20"
serde_json = ">=1.0.96, <2.0"
wasm-bindgen = { version = "0.2.91", features = ["serde-serialize"] }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: should this use the workspace version?

wasm-bindgen = { workspace = true }

I haven't seen this syntax before, but I saw that you did this in crates/bitwarden-core/Cargo.toml

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we use an explicit version here while the workspace uses ranges.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh ok, is that because this version is used for building and in that case wasm-bindgen and wasm-bindgen-cli versions need to be exact, while for the other stuff we can be more relaxed with the version? Do you think that different versions can cause issues? Or should it be fine since we're using the same minor versions?

}
}

// Rc<...> is to avoid needing to take ownership of the Client during our async run_command
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question/issue?: We don't have a run_command anymore?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nop, but copy pasta until we figure out if we need RC here or not 🤷

@Hinton Hinton requested a review from michalchecinski October 1, 2024 20:56
@coroiu
Copy link
Contributor

coroiu commented Oct 2, 2024

@Hinton the PR has workflow linting issues

@Hinton
Copy link
Member Author

Hinton commented Oct 3, 2024

@coroiu those aren't from this PR.

@Hinton Hinton merged commit b74d969 into main Oct 4, 2024
94 of 100 checks passed
@Hinton Hinton deleted the ps/bitwarden-wasm-internal branch October 4, 2024 08:16
@Hinton Hinton restored the ps/bitwarden-wasm-internal branch October 4, 2024 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants